import {getCourseList} from "@/api/teacher/course";

export let methods = {

    getCourseList() {
        getCourseList().then(res => {
            if (res.result) {
                this.courses = res.courses;
            } else {
                this.$message.error(res.msg);
            }
        });
    },
    gotoCourseDetail(course){
        localStorage.setItem("session", JSON.stringify(course));
        this.$router.push({name: "courseDetail"});
    },
    closeModal(){
        this.courseModelShow = false;
        this.recentCourse = {};
    }
}